home *** CD-ROM | disk | FTP | other *** search
- {$R-} {Range checking off}
- {$B+} {Boolean complete evaluation on}
- {$S+} {Stack checking on}
- {$I+} {I/O checking on}
- {$N-} {No numeric coprocessor}
- {$V-}
- program Field_Day_Log_Duper;
- Uses
- Crt,
- Dos;
-
- {$I FD_CONST.PAS }
- {$I FD_TYPE.PAS }
- {$I FD_VAR.PAS }
- {$I FD_COLOR.PAS }
- {$I FD_DOS.PAS }
-
- procedure print(pdata : data); forward;
- procedure fprint(pdata : data); forward;
- function cmp(d1, d2 : data): integer; forward;
- function check_if_ok(d1 : data): integer; forward;
- procedure add_to_score(pdata : data); forward;
-
- {$I AVL_TREE.PAS}
-
- {$I FD_AVL.PAS}
- {$I FD_IMAGE.PAS }
- {$I FD_DISP.PAS }
- {$I FD_INIT.PAS }
- {$I FD_UTIL.PAS }
-
- var fd_key : char;
-
- BEGIN
- root := NIL;
- tbranch := talloc;
- del_ptr := talloc;
- read_init;
- read_image;
- set_x_y;
- x := 0; y := 0;
- save_entry_screen;
- video_disable;
- move(image1,video,4000);
- video_enable;
- disp_mode;
- disp_band;
- disp_score;
- repeat
- repeat date_time until keypressed;
- fd_key := UpCase(readkey);
- case fd_key of
- 'S' :begin
- tbranch^.leaf.section := section;
- disp_section(tbranch^.leaf.section);
- end;
- 'D' : begin
- if (find(root, tbranch) <> NIL)
- then found_it;
- end;
- 'C' : tbranch^.leaf.callsign := enter_callsign;
- 'A' : tbranch^.leaf.class := enter_class;
- 'B' : begin
- change_band;
- tbranch^.leaf.band := band;
- end;
- 'M' : begin
- change_mode;
- tbranch^.leaf.xmtmode := op_mode;
- end;
- 'U' : utility;
- 'E' : begin
- if (length(tbranch^.leaf.callsign) > 0) AND
- (find(root, tbranch) = NIL)
- then
- begin
- p := talloc;
- if (p = NIL)
- then out_of_memory
- else begin
- p^.leaf := tbranch^.leaf;
- add_to_score(p^.leaf);
- insert(root,p);
- clear_all;
- end;
- end
- else found_it;
- end;
- #0 : fd_key := readkey;
- end;
- disp_score;
- until FALSE;
- END.